package com.uflower.search.controller;

import com.uflower.common.to.es.SkuEsModel;
import com.uflower.common.utils.R;
import com.uflower.search.service.EsProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

//储存上架商品检索数据
@Controller
@RequestMapping("/es")
public class ElasticSaveController {
    @Autowired
    EsProductService esProductService;
    @RequestMapping("/product/status/up")
    @ResponseBody
    public R statusUp(@RequestBody List<SkuEsModel> esModels){
        esProductService.productStatusUp(esModels);
        return R.ok();
    }
}
